#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
	char ch;  //ASCII码表中 A-Z的ASCII码值为65-90 a-z的ASCII码值为97-122
	while ((ch = getchar()) != '\n')
	{
		if (ch >= 'A' && ch < 'Z')  //大写字母转成小写字母
			ch = ch + 32 + 1;
		else if (ch == 'Z')
			ch = ch + 32 - 25;
		else if (ch >= 'a' && ch < 'z')  //小写字母转成大写字母
			ch = ch - 32 + 1;
		else if (ch == 'z')
			ch = ch - 32 - 25;

		printf("%c", ch);
	}
	return 0;
}